﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UITesting.WinControls;
using Microsoft.VisualStudio.TestTools.UITesting;
using MSN;

namespace TestProject
{
    // [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class UILoginWindow : WinWindow
    {

        public UILoginWindow()
        {
            #region Search Criteria
            this.SearchProperties[WinWindow.PropertyNames.Name] = ConstVariable.MSN;
            this.SearchProperties[WinWindow.PropertyNames.ClassName] = "SharedSigninDialogClass";
            this.WindowTitles.Add(ConstVariable.MSN);
            #endregion
            
        }

        #region Properties
        public WinEdit UIEmailaddressEdit
        {
            get
            {
                if ((this.mUIEmailaddressEdit == null))
                {
                    this.mUIEmailaddressEdit = new WinEdit(this);
                    #region Search Criteria
                    this.mUIEmailaddressEdit.SearchProperties[WinEdit.PropertyNames.Name] = "Email address:";
                    this.mUIEmailaddressEdit.WindowTitles.Add(ConstVariable.MSN);
                    #endregion
                }
                return this.mUIEmailaddressEdit;
            }
        }

        public WinEdit UIPasswordEdit
        {
            get
            {
                if ((this.mUIPasswordEdit == null))
                {
                    this.mUIPasswordEdit = new WinEdit(this);
                    #region Search Criteria
                    this.mUIPasswordEdit.SearchProperties[WinEdit.PropertyNames.Name] = "Password:";
                    this.mUIPasswordEdit.WindowTitles.Add(ConstVariable.MSN);
                    #endregion
                }
                return this.mUIPasswordEdit;
            }
        }

        public WinControl UIStatusMenuButton
        {
            get
            {
                if ((this.mUIStatusMenuButton == null))
                {
                    this.mUIStatusMenuButton = new WinControl(this);
                    #region Search Criteria
                    this.mUIStatusMenuButton.SearchProperties[UITestControl.PropertyNames.Name] = "Status:";
                    this.mUIStatusMenuButton.SearchProperties[UITestControl.PropertyNames.ControlType] = "MenuButton";
                    this.mUIStatusMenuButton.WindowTitles.Add(ConstVariable.MSN);
                    #endregion
                }
                return this.mUIStatusMenuButton;
            }
        }

        public WinCheckBox UIRemembermyIDandpasswCheckBox
        {
            get
            {
                if ((this.mUIRemembermyIDandpasswCheckBox == null))
                {
                    this.mUIRemembermyIDandpasswCheckBox = new WinCheckBox(this);
                    #region Search Criteria
                    this.mUIRemembermyIDandpasswCheckBox.SearchProperties[WinCheckBox.PropertyNames.Name] = "Remember my ID and password";
                    this.mUIRemembermyIDandpasswCheckBox.WindowTitles.Add(ConstVariable.MSN);
                    #endregion
                }
                return this.mUIRemembermyIDandpasswCheckBox;
            }
        }

        public WinCheckBox UISignmeinautomaticallCheckBox
        {
            get
            {
                if ((this.mUISignmeinautomaticallCheckBox == null))
                {
                    this.mUISignmeinautomaticallCheckBox = new WinCheckBox(this);
                    #region Search Criteria
                    this.mUISignmeinautomaticallCheckBox.SearchProperties[WinCheckBox.PropertyNames.Name] = "Sign me in automatically";
                    this.mUISignmeinautomaticallCheckBox.WindowTitles.Add(ConstVariable.MSN);
                    #endregion
                }
                return this.mUISignmeinautomaticallCheckBox;
            }
        }

        public WinButton UISigninButton
        {
            get
            {
                if ((this.mUISigninButton == null))
                {
                    this.mUISigninButton = new WinButton(this);
                    #region Search Criteria
                    this.mUISigninButton.SearchProperties[WinButton.PropertyNames.Name] = "Sign in";
                    this.mUISigninButton.WindowTitles.Add(ConstVariable.MSN);
                    #endregion
                }
                return this.mUISigninButton;
            }
        }
        #endregion

        #region Fields
        private WinEdit mUIEmailaddressEdit;

        private WinEdit mUIPasswordEdit;

        private WinControl mUIStatusMenuButton;

        private WinCheckBox mUIRemembermyIDandpasswCheckBox;

        private WinCheckBox mUISignmeinautomaticallCheckBox;

        private WinButton mUISigninButton;
        #endregion
    }
}
